package com.example.qxfw.ldyj.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qxfw.common.entity.qx.Raiden;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
@DS("qx")
public interface RaidenMapper extends BaseMapper<Raiden> {

    @Select("select observetime " +
            "from Raiden " +
            "where county like '${county}' " +
            "order by observetime desc")
    List<String> selectObserveTime(@Param("county") String county);
 @Select("select observetime "+
         "from Raiden " +
         "order by observetime asc "+
         "LIMIT 1 ")
    String selectEarliestTime();
    @Select("select observetime "+
            "from Raiden " +
            "order by observetime desc "+
            "LIMIT 1 ")
    String selectLatestTime();
}
